import 'package:flutter_fronter_service/generated/json/base/json_field.dart';
import 'package:flutter_fronter_service/generated/json/cart_entity.g.dart';
import 'dart:convert';

import 'package:flutter_fronter_service/model/sku_entity.dart';
export 'package:flutter_fronter_service/generated/json/cart_entity.g.dart';

@JsonSerializable()
class CartEntity {
	late int id = 0;
	late int quantity = 0;
	late SkuEntity skuEntity;
	late String spec = "";

	CartEntity();

	factory CartEntity.fromJson(Map<String, dynamic> json) => $CartEntityFromJson(json);

	Map<String, dynamic> toJson() => $CartEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}